package com.xiaodou.mjf.infrastructure.common.app;

import java.io.Serializable;
import java.util.List;

import com.xiaodou.mjf.infrastructure.common.entity.CommonEntity;

/**
 * Created by Rocky on 15/3/24.
 */
public interface Mapper<T extends CommonEntity,ID extends Serializable> {

    T get(ID id);

    ID insert(T entity);

    void update(T entity);

    void delete(ID id);

    List<T> list(T entity);

    List<T> list();

    Integer count(T entity);
}
